package com.chunk.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;


public class Cons {
	public static String FILE_PATH_UPLOAD_CHUNKS = "C:\\datas\\chunks"; //分片地址
	public static String FILE_PATH_UPLOAD_INTS = "C:\\datas\\ints";	//合并后的文件地址
	
	
	static{
		try {
			FILE_PATH_UPLOAD_CHUNKS = getProperties().getProperty("FILE_PATH_UPLOAD_CHUNKS");
			FILE_PATH_UPLOAD_INTS = getProperties().getProperty("FILE_PATH_UPLOAD_INTS");
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}
	
	
	
	private static Properties getProperties() throws IOException{
		InputStream in = Cons.class.getClassLoader().getResourceAsStream("config.properties");
		//创建一个Properties对象
		Properties prop = new Properties(); 
		prop.load(in);
		return prop;
	}
}
